<?php foreach ($data as $k => $v) { ?>
  <div class="col-sm-4" >
    <div class="panel panel-primary" >
      <div class="panel-heading">
        <h3 class="panel-title"><?php echo $v['username'] ?>(<?php echo time_format($v['ctime']) ?>)</h3>
      </div>
      <div class="panel-body">
       <?php echo $v['content']; ?>
      </div>
      <div class="panel-body">
        <a href="./index.php?a=edit&id=<?php echo $v['msg_id']; ?>" class="btn btn-success">编辑</a>
        <a href="./index.php?a=del&id=<?php echo $v['msg_id']; ?>" class="btn btn-danger">删除</a>
      </div>
    </div>
  </div>

  <?php } ?>